import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { ApSystemService } from './ap_system.service';


@Controller('ap/system')
export class ApSystemController {
  constructor(private readonly apSystemService: ApSystemService) {}
    @Post("/baseband_ctl")
    baseband_ctl(@Body() body: any) {
        return this.apSystemService.baseband_ctl(body);
    }

    @Post('/get_baseband_info')
    baseband_get() {
        return this.apSystemService.baseband_get();
    }

    @Post('/baseband_switch')
    basebandSwitch(@Body("id") id: any) {
        return this.apSystemService.basebandSwitch(id);
    }

    //保存快捷命令
    @Post('/save_quick_command')
    saveQuick(@Body() body: any) {
        return this.apSystemService.saveQuick(body);
    }

    //获取快捷命令
    @Post('/get_quick_command')
    getQuick(@Body() body: any) {
        return this.apSystemService.getQuick(body);
    }

    //删除快捷命令
    @Post('/delete_quick_command')
    deleteQuick(@Body() body: any) {
        return this.apSystemService.deleteQuick(body);
    }

    // 获取ap版本
    @Post('/ap_version_cur_get')
    getApVersion(){
        return this.apSystemService.getApVersion();
    }

    //获取ap版本列表
    @Post('/ap_version_list_get')
    getApList(){
        return this.apSystemService.getApList();
    }

    //切换ap版本
    @Post('/ap_version_sel')
    setApVersion(@Body('index') index: any){
        return this.apSystemService.setApVersion(index);
    }

    //删除ap版本
    @Post('/ap_version_del')
    deleteApVersion(@Body('index') index: any){
        return this.apSystemService.deleteApVersion(index);
    }
    

    //获取cp固件列表
    @Post('/cp_firmware_list_get')
    getCpFirmwareList(){
        return this.apSystemService.getCpFirmwareList();
    }

    //切换cp固件
    @Post('/cp_firmware_sel')
    setCpFirmware(@Body('name') name: any){
        return this.apSystemService.setCpFirmware(name);
    }

    //获取当前cp固件
    @Post('/cp_firmware_cur_get')
    getCpFirmware(){
        return this.apSystemService.getCpFirmware();
    }

    //删除cp固件
    @Post('/cp_firmware_del')
    deleteCpFirmware(@Body('name') name: any){
        return this.apSystemService.deleteCpFirmware(name);
    }

    // cp设备状态获取
    @Post('/cp_device_info')
    getCpDeviceInfo(){
        return this.apSystemService.getCpDeviceInfo();
    }

    // 基带插损获取
    @Post('/baseband_insertion_loss_get')
    getBasebandInsertionLoss(){
        return this.apSystemService.getBasebandInsertionLoss();
    }

    // 基带插损设置
    @Post('/baseband_insertion_loss_set')
    setBasebandInsertionLoss(@Body() body: any){
        return this.apSystemService.setBasebandInsertionLoss(body);
    }


    /* 获取cp类型 */
    @Post('/platform_cur_cp_type')
    getCpType(){
        return this.apSystemService.getCpType();
    }


    /* 获取cumx信息 */
    @Post('/cmux_info')
    getCumxInfo(){
        return this.apSystemService.getCumxInfo();
    }

    /* 自动切换高低轨获取 */
    @Post('/switch_leo_geo_get')
    getSwitchLeoGeo(){
        return this.apSystemService.getSwitchLeoGeo();
    }

    /* 自动切换高低轨设置 */
    @Post('/switch_leo_geo_set')
    setSwitchLeoGeo(@Body('is_switch_leo_geo_auto') is_switch_leo_geo_auto: any){
        return this.apSystemService.setSwitchLeoGeo(is_switch_leo_geo_auto);
    }

    
}
